package com.ayg.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;
import java.util.Map;

@TableName("user")
@Data
@Accessors(chain = true)
public class User extends BasePojo{
    @TableId(type = IdType.AUTO)
    private Integer id;  //主键
    private String email; //邮箱
    private String password; //密码 使用MD5+盐 加密
    private String username; //用户名
    private String salt; //盐
    private String confirmCode; //确认码
    private String phone; //电话
    private LocalDateTime activationTime; //激活失效时间
    private Byte isValid; //是否可用
    private Integer status; //状态码


    @TableField(exist = false)  //该属性不存在
    private Map<String,Object> children;  //定义role角色数据
}
